package com.erbao.dp.builder;

/**
 * @author CaoBaoYin
 * @since 21/9/27 14:51
 */
public class ComplexTerrainBuilder implements TerrainBuilder {
    private Terrain terrain;
    public ComplexTerrainBuilder() {
        this.terrain = new Terrain();
    }

    @Override
    public TerrainBuilder buildWall() {
        terrain.w = new Wall(10,10,50, 50);
        return this;
    }

    @Override
    public TerrainBuilder buildFort() {
        terrain.f = new Fort(10,10,50, 50);
        return this;
    }

    @Override
    public TerrainBuilder buildMine() {
        terrain.m = new Mine(10,10,50, 50);
        return this;
    }

    @Override
    public Terrain build() {
        return this.terrain;
    }
}
